<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 使用float的实现 */
        /* .outer {
            width: 100px;
            height: 100px;
            background-color: red;
            float: left;
        }
        .inner {
            width: 50px;
            height: 50px;
            background-color: blue;
            margin-left: 10px;
            margin-top: 10px;
        } */
        /* 使用padding的实现 */
        .outer {
            width: 100px;
            height: 100px;
            background-color: red;
            padding: 10px;
        }
        .inner {
            width: 50px;
            height: 50px;
            background-color: blue;
            /* margin-left: 10px;
            margin-top: 10px; */
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="inner"></div>
    </div>
</body>
</html>